﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Transactions;

namespace AutoPartsSearch.Domain.Common
{
    public static class TransactionUtils
    {
        public static TransactionScope CreateTransactionScope()
        {
            var transactionOptions = new TransactionOptions
                                         {
                                             IsolationLevel = IsolationLevel.ReadCommitted,
                                             Timeout = TransactionManager.MaximumTimeout
                                         };
            return new TransactionScope(TransactionScopeOption.Required, transactionOptions);
        }
    }
}
